package com.fxb.chapter02consumer.service;

import com.fxb.chapter02provider.api.IProviderService;
import javax.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

/**
 * 消费业务逻辑实现
 *
 * @author fangjiaxiaobai
 * @date 2021-10-13 21:02
 */
@Service
public class ConsumerService {

    // 引用Dubbo服务。使用@DubboReference注解
    @DubboReference
    private IProviderService providerService;

    public String sayHello(String name) {
        return providerService.sayHello(name);
    }

}
